/*
 * Copyright(c) 2020-2100 万达信息股份有限公司 版权所有
 * WONDERS INFORMATION CO., LTD. ALL RIGHTS RESERVED.
 */

package com.wondersgroup;

/**
 * @author: huym
 * @version: 1.0
 * @date: 2020/12/10
 */
public class CatHeightComparator implements Comparator<Cat> {
    @Override
    public int compareTo(Cat o1, Cat o2) {
        if (o1.height>o1.height) return -1;
        else if (o1.height<o2.height) return 1;
        else return 0;
    }
}